c program to print pattern n with input character